import QtQuick 2.12
import QtQuick.Dialogs 1.3
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.3

Dialog {
    id: settingsDialog
    title: "增加曲线"
    width: 400
    height: 250
    property alias saveButton:saveButton
    property alias cancelButton:cancelButton
    property alias xInput:xInput
    property alias yInput:yInput
    property alias typeBox:cb1
    ColumnLayout  {
        anchors.centerIn: parent
        ComboBox {
            id:cb1
            width: 110
            height: 31
            textRole: "text"
            model: model1
            Layout.alignment: Qt.AlignCenter
        }
        RowLayout{
            Layout.alignment: Qt.AlignCenter
            Text {
                text: "输入x,y坐标:"
            }
            TextField {
                id: xInput
                placeholderText: "x坐标"
                Layout.preferredWidth: 95
                selectByMouse: true
            }
            TextField {
                id: yInput
                placeholderText: "y坐标"
                Layout.preferredWidth: 95
                selectByMouse: true
            }
        }
        RowLayout{
            Layout.topMargin:10
            Layout.alignment: Qt.AlignCenter
            Button {
                id:saveButton
                Layout.alignment: Qt.AlignCenter
                text: "保存"
            }
            Button {
                id:cancelButton
                Layout.alignment: Qt.AlignCenter
                text: "取消"
            }
        }
    }
    ListModel{
        id:model1
        ListElement{
            text:"折线图"
        }
        ListElement{
            text:"散点图"
        }
//        ListElement{
//            text:"曲线图"
//        }
    }
}
